package com.ezops.poc.util;

/**
 * Excpetion to indicate the failure in parsing the cliet file.
 * 
 * @author vgaurav
 * 
 */
public class ParseException extends Exception {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String fileName;
	private Throwable wrappedException;
	private String parseErrorMessage;

	public ParseException(String file, Throwable exception,
			String userMessage) {
		this.fileName = file;
		this.wrappedException = exception;
		this.parseErrorMessage = userMessage;
	}

	public ParseException(Throwable exception,
			String userMessage) {
		this.wrappedException = exception;
		this.parseErrorMessage = userMessage;
	}
	public String getMessage() {
		return wrappedException.getMessage();
	}

	public String getParseErrorMessage() {
		return parseErrorMessage;
	}

	public void setParseErrorMessage(String parseErrorMessage) {
		this.parseErrorMessage = parseErrorMessage;
	}

	public Throwable getCause() {
		return wrappedException.getCause();
	}

	public void printStackTrace() {
		wrappedException.printStackTrace();
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public Throwable getWrappedException() {
		return wrappedException;
	}

	public void setWrappedException(Throwable wrappedException) {
		this.wrappedException = wrappedException;
	}

}
